GCP CLI Reference
Configure CLI SSOâ
What you'll needâ
- Install AWS CLI with the default options enabled (make sure 'Bundled Python' is enabled)
Setupâ
- Run initial CLI init by running
gcloud initfrom terminal (follow the configuration manual if needed). When prompted after signing in, choose 'backend-me-west1' as the default project - Configure local default credentials by running
gcloud auth application-default loginfrom terminal (follow the configuration manual if needed)
Addition steps for Windows onlyâ
To allow running local backend in docker against GCP backend a few additional steps are needed:
- Move GCP CLI credentials folder from appdata to user dir, to align with paths on Mac and Linux:
setx CLOUDSDK_CONFIG "${env:HOME}${env:USERPROFILE}\.config\gcloud"
mkdir $env:CLOUDSDK_CONFIG -Force - If GCP CLI was already authenticated before in the default path, force it to regenerate by running:
gcloud auth revoke --all
gcloud auth login
gcloud auth application-default revoke
gcloud auth application-default login
Additional infoâ
After the initial setup, when needing to refresh credentials run the following commands:
gcloud auth login
gcloud auth application-default login
Note: both commands have to be run